<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE>
<html>
<head>
    <title>添加学习资料</title>

    <smLink1></smLink1>
    <smLink2>
        <link rel="stylesheet" href="<%=basePath%>js/lib/uploadifive/uploadifive.css">
    </smLink2>

    <smScript1></smScript1>
    <smScript2>
        <script type="text/javascript" src="<%=basePath%>js/lib/jquery/jquery-validation/jquery.validate.min.js"></script>
        <script type="text/javascript" src="<%=basePath%>js/lib/jquery/jquery-validation/localization/messages_zh.min.js"></script>
        <script type="text/javascript" src="<%=basePath%>js/lib/uploadifive/jquery.uploadifive.min.zh_cn.js"></script>
        <script type="text/javascript" src="<%=basePath%>js/common/uploadifive.utils.js"></script>
        <script type="text/javascript" src="<%=basePath%>js/jsp/learn/file/add.js"></script>
    </smScript2>
</head>

<body>
<div id="breadcrumbs" class="breadcrumbs ace-save-state">
    <ul class="breadcrumb">
        <li>
            <a href="<%=basePath%>web/learn/file/list.html">资料列表</a>
        </li>
        <li>
            <span>添加资料</span>
        </li>
    </ul>
</div>

<div class="page-content">
    <div class="row">
        <div class="col-xs-7">
            <form id="learn_form" class="form-horizontal" role="form" method="post" action="<%=basePath%>web/learn/file/add.html">
                <input name="learnFileNames" type="hidden" value="">
                <input name="learnFilePaths" type="hidden" value="">

                <div class="form-group">
                    <label class="col-xs-3 control-label no-padding-right" for="learn_name">资料标题</label>

                    <div class="col-xs-9">
                        <input id="learn_name" name="learnName" class="col-md-7" type="text" value="" placeholder="资料标题">
                    </div>
                </div>

                <div class="space-1"></div>

                <div class="form-group">
                    <label class="col-xs-3 control-label no-padding-right" for="learn_content">资料内容</label>

                    <div class="col-xs-9">
                        <textarea id="learn_content" name="learnContent" class="col-md-7" rows="10" placeholder="资料内容"></textarea>
                    </div>
                </div>

                <div class="space-1"></div>

                <div class="form-group">
                    <label class="col-xs-3 control-label no-padding-right" for="upload_learn_files_btn">资料附件</label>

                    <div class="col-xs-9">
                        <button id="upload_learn_files_btn" class="btn btn-success btn-xs" type="button">
                            <i class="ace-icon iconfont icon-upload f-s-12"></i>上传附件
                        </button>
                    </div>
                </div>

                <div class="space-1"></div>

                <div class="form-group">
                    <label class="col-xs-3 control-label no-padding-right" for="learn_type">资料类型</label>

                    <div class="col-xs-9">
                        <select id="learn_type" name="learnType" class="col-md-7">
                            <option selected="selected" value="">请选择</option>
                            <option value="A">煤矿</option>
                            <option value="B">非煤矿山</option>
                            <option value="C">危化烟花爆竹</option>
                            <option value="D">职业健康和工贸</option>
                            <option value="F">法律法规</option>
                            <option value="G">处罚标准</option>
                            <option value="H">消防安全</option>
                            <option value="I">道路交通</option>
                            <option value="J">建筑施工</option>
                            <option value="K">其他</option>
                        </select>
                    </div>
                </div>

                <div class="space-1"></div>

                <div class="clearfix form-actions">
                    <div class="col-md-offset-3 col-md-9">
                        <button name="addLearnBtn" class="btn btn-info" type="submit">
                            <i class="ace-icon iconfont icon-plus"></i>提交
                        </button>

                        &nbsp; &nbsp; &nbsp;

                        <button class="btn" type="reset">
                            <i class="ace-icon iconfont icon-reset"></i>重置
                        </button>
                    </div>
                </div>
            </form>
        </div>

        <div class="col-xs-5">
            <div class="col-xs-12 f-s-14 red">数据校验如下：</div>

            <div class="col-xs-12">
                <div class="alert alert-warning m-0 m-t-5 p-0">
                    <ol class="validate-ol f-s-12">
                        <li>1、资料标题，必填；</li>
                        <li>2、资料内容，必填；</li>
                        <li>3、资料附件，非必上传；</li>
                        <li>4、资料类型，必选。</li>
                    </ol>
                </div>
            </div>

            <div class="col-xs-12">
                <div id="validate_container" class="display-none alert alert-danger m-0 m-t-5 p-0">
                    <ul class="validate-ul f-s-12"></ul>
                </div>
            </div>

            <div class="col-xs-12">
                <div id="learn_queue"></div>
            </div>
        </div>
    </div>
</div>
</body>
</html>